:root {
  --primary-color: #0095ff;
  --text-color: #333;
  --bg-color: #f5f7fa;
  --card-bg: #fff;
  --border-color: #eaedf1;
  --slider-active: #0095ff;
  --slider-inactive: #ccc;
  --highlight-blue: #e6f4ff;
  --curtain-orange: #ff9f43;
  --curtain-blue: #54a0ff;
  --disabled-color: #ccc;
}

* {
  margin: 0;
  padding: 0;
  /* box-sizing: border-box; */
  font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

.smartHomeContainer {
  max-width: 750px;
  margin: 0 auto;
  background-color: var(--card-bg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding-bottom: 20px;
}

/* 头部导航栏 */
.headerBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--primary-color);
  color: white;
  padding: 24px 30px;
  position: relative;
}

.backBtn {
  position: absolute;
  left: 15px;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  padding: 8px;
}

.backBtn:hover {
  color: rgba(255, 255, 255, 0.8);
}

.hotelFeature {
  font-size: 30px;
  font-weight: 500;
  flex: 1;
  text-align: center;
}

.controlsRight {
  display: flex;
  align-items: center;
}

.dot {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  margin: 0 4px;
}

.dot.active {
  background-color: white;
}

/* 助手信息 */
.assistantSection {
  display: flex;
  align-items: center;
  padding: 30px;
  border-bottom: 1px solid var(--border-color);
}

.assistantAvatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.assistantInfo {
  margin-left: 24px;
  flex: 1;
}

.assistantName {
  font-weight: 600;
  font-size: 32px;
}

.assistantStatus {
  color: #666;
  font-size: 24px;
  margin-top: 4px;
}

.onlineStatus {
  display: flex;
  align-items: center;
  color: #4CAF50;
  font-size: 28px;
}

.statusDot {
  width: 16px;
  height: 16px;
  background-color: #4CAF50;
  border-radius: 50%;
  margin-right: 10px;
}

/* 环境数据 */
.weatherStatsContainer {
  display: flex;
  justify-content: space-between;
  padding: 30px;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.statItem {
  text-align: center;
  flex: 1;
}

.statValue {
  font-size: 40px;
  font-weight: 600;
  color: var(--text-color);
}

.statValue span {
  font-size: 32px;
  font-weight: 400;
}

.statLabel {
  font-size: 28px;
  color: #666;
  margin-top: 8px;
}

/* 音乐播放器 */
.musicPlayer {
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-color);
}

.musicHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.musicInfo {
  font-size: 28px;
  font-weight: 500;
  color: var(--text-color);
}

.muteBtn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.musicProgress {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}

.progressBar {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--slider-inactive);
  border-radius: 3px;
  cursor: pointer;
}

.progressBar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
}

.progressBar::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
}

.timeCurrent,
.timeTotal {
  font-size: 24px;
  color: #666;
  width: 60px;
}

.timeCurrent {
  text-align: left;
}

.timeTotal {
  text-align: right;
}

.playerControls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.controlBtn {
  background: none;
  border: none;
  font-size: 48px;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.controlBtn.play {
  color: var(--primary-color);
  font-size: 60px;
}

/* 空调控制 */
.acControlSection {
  padding: 30px;
  border-bottom: 1px solid var(--border-color);
}

.sectionHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.sectionTitle {
  font-size: 32px;
  font-weight: 600;
}

.powerBtn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background-color: #f0f0f0;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 32px;
}

.powerBtn.active {
  background-color: var(--primary-color);
  color: white;
}

.tempControl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--highlight-blue);
  border-radius: 20px;
  padding: 20px 30px;
  margin-bottom: 30px;
}

.tempBtn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background-color: white;
  color: var(--primary-color);
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tempBtn:disabled {
  background-color: #f5f5f5;
  color: var(--disabled-color);
  cursor: not-allowed;
}

.tempDisplay {
  flex: 1;
  text-align: center;
}

.tempValue {
  font-size: 30px;
  color: var(--primary-color);
}

.modeSelector {
  display: flex;
  justify-content: space-between;
}

.modeBtn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  padding: 20px;
  cursor: pointer;
}

.modeBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modeIcon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 36px;
  color: #666;
}

.modeBtn.active .modeIcon {
  background-color: var(--primary-color);
  color: white;
}

.modeBtn span {
  font-size: 24px;
  color: #666;
}

.modeBtn.active span {
  color: var(--primary-color);
}

/* 窗帘控制 */
.curtainSection {
  padding: 30px;
  border-bottom: 1px solid var(--border-color);
}

.curtainActions {
  display: flex;
}

.curtainActions button {
  background: none;
  border: none;
  color: #666;
  font-size: 28px;
  margin-left: 20px;
  cursor: pointer;
}

.curtainsContainer {
  padding: 20px 0;
}

.curtainCard {
  background-color: #f9f9f9;
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
}

.curtainHeader {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.curtainIcon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-right: 20px;
}

.curtainIcon.living {
  background-color: rgba(255, 159, 67, 0.1);
  color: var(--curtain-orange);
}

.curtainIcon.bedroom {
  background-color: rgba(84, 160, 255, 0.1);
  color: var(--curtain-blue);
}

.curtainName {
  font-size: 28px;
  font-weight: 500;
}

.curtainControls {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.curtainBtn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  background-color: white;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 32px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.curtainBtn.open {
  color: var(--primary-color);
}

.curtainBtn.close {
  color: var(--primary-color);
}

/* 灯光控制 */
.lightsSection {
  padding: 30px;
  border-bottom: 1px solid var(--border-color);
}

.lightActions {
  display: flex;
}

.lightActions button {
  background: none;
  border: none;
  color: #666;
  font-size: 28px;
  margin-left: 20px;
  cursor: pointer;
}

.lightsGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

.lightControl {
  display: flex;
  align-items: center;
  background-color: #f9f9f9;
  border-radius: 20px;
  padding: 30px;
}

.lightIcon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  font-size: 36px;
  color: #666;
}

.lightName {
  flex: 1;
  font-size: 28px;
}

/* 开关样式 */
.switch {
  position: relative;
  display: inline-block;
  width: 80px;
  height: 40px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--slider-inactive);
  transition: .4s;
  border-radius: 40px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 32px;
  width: 32px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--slider-active);
}

input:checked + .slider:before {
  transform: translateX(40px);
}

/* 加载指示器样式 */
.loadingSpinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(0, 149, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 错误信息样式 */
.errorMessage {
  color: #e74c3c;
  text-align: center;
  margin: 10px 0;
  font-size: 24px;
}
